package org.real.guetshop.service;

import org.real.guetshop.exception.StorageNotEnoughException;
import org.real.guetshop.pojo.dto.EditProductDTO;
import org.real.guetshop.pojo.dto.ShoppingCartDTO;
import org.real.guetshop.pojo.entity.ShopCart;

import java.util.List;

public interface ShopCartService {

    /**
     * 添加购物车
     * @param shoppingCartDTO
     */
    void addShopCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 查看购物车
     * @return
     */
    List<ShopCart> showShopCart();

    /**
     * 清空购物车
     */
    void clean();

    /**
     * 减少单个商品
     * @param minusProductDTO
     */
    void editNum(EditProductDTO minusProductDTO) throws StorageNotEnoughException;
}
